package com.logictech.lims.entity;

import java.util.Date;
import org.jeecgframework.p3.core.utils.persistence.Entity;

import com.logictech.common.util.data.DateUtils;
import com.logictech.common.util.data.StringUtils;

/**
 * 描述：</b>Sourcing:采购需求<br>
 * 
 * @author guoqi
 * @since：2017年04月14日 13时18分21秒 星期五
 * @version:1.0
 */
public class Sourcing implements Entity<Integer> {
	private static final long serialVersionUID = 1L;

	/**
	 * id
	 */
	private Integer id;
	/**
	 * 采购需求
	 */
	private String requirement;
	/**
	 * 级别
	 */
	private String level;
	/**
	 * 数量
	 */
	private Integer quantity;
	/**
	 * 要求到货日期
	 */
	private String requestArrivalDate;
	/**
	 * 状态
	 */
	private String status;

	/**
	 * 状态
	 */
	private String statusVal;
	/**
	 * 确认收货日期
	 */
	private String confirmReceiptDate;
	/**
	 * 确认人
	 */
	private String confirmUser;
	/**
	 * 确认人
	 */
	private String confirmUserName;
	/**
	 * 创建者Id
	 */
	private String createUser;

	private String createUserName;
	/**
	 * 创建时间
	 */
	private Date createTime;
	/**
	 * 更新者Id
	 */
	private String updateUser;
	/**
	 * 更新时间
	 */
	private Date updateTime;

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getRequirement() {
		return this.requirement;
	}

	public void setRequirement(String requirement) {
		this.requirement = requirement;
	}

	public String getLevel() {
		return this.level;
	}

	public void setLevel(String level) {
		this.level = level;
	}

	public Integer getQuantity() {
		return this.quantity;
	}

	public void setQuantity(Integer quantity) {
		this.quantity = quantity;
	}

	public String getRequestArrivalDate() {
		return this.requestArrivalDate;
	}

	public void setRequestArrivalDate(String requestArrivalDate) {
		this.requestArrivalDate = requestArrivalDate;
	}

	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getConfirmReceiptDate() {
		return this.confirmReceiptDate;
	}

	public void setConfirmReceiptDate(String confirmReceiptDate) {
		this.confirmReceiptDate = confirmReceiptDate;
	}

	public String getConfirmUser() {
		return this.confirmUser;
	}

	public void setConfirmUser(String confirmUser) {
		this.confirmUser = confirmUser;
	}

	public String getCreateUser() {
		return this.createUser;
	}

	public void setCreateUser(String createUser) {
		this.createUser = createUser;
	}

	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getUpdateUser() {
		return this.updateUser;
	}

	public void setUpdateUser(String updateUser) {
		this.updateUser = updateUser;
	}

	public Date getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public String getConfirmUserName() {
		return confirmUserName;
	}

	public void setConfirmUserName(String confirmUserName) {
		this.confirmUserName = confirmUserName;
	}

	public String getStatusVal() {
		if ("0".equals(status)) {
			statusVal = "未到货";
		} else {
			statusVal = "已到货";
		}
		return statusVal;
	}

	public void setStatusVal(String statusVal) {
		this.statusVal = statusVal;
	}

	public String getCreateUserName() {
		return createUserName;
	}

	public void setCreateUserName(String createUserName) {
		this.createUserName = createUserName;
	}

	@Override
	public String toString() {
		return " [采购需求=" + requirement + ", 级别=" + level + ", 数量=" + quantity + ", 要求到货日期=" + requestArrivalDate
				+ ", 状态=" + getStatusVal() + ", 提出人=" + createUserName + ", 提出日期="
				+ DateUtils.dateToString(createTime, DateUtils.PATTEN_YMD) + ", 确认收货日期="
				+ StringUtils.nvl(confirmReceiptDate) + ", 确认人=" + StringUtils.nvl(confirmUserName) + "]";
	}

}
